﻿using NearAop;
using System;
using System.ComponentModel;

namespace CS
{
    /// <summary>
    /// 
    /// </summary>
    [AddNotifyPropertyChanged]
    class T01_属性变更通知
    {
        public int MyProperty { get; set; }

        public void Test()
        {
            (this as INotifyPropertyChanged).PropertyChanged +=
                (s, e) => Console.WriteLine($"属性{e.PropertyName}被修改");

            MyProperty += 1;
        }
    }
}
